﻿Imports System.Data
Imports VSModel
Imports Cls_Common
Imports SecurityService

Partial Class FrontEnd_Control_Footer
    Inherits System.Web.UI.UserControl
   
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            Dim _lang As Integer = Session("LanguageId")
            Using _data As New VSEntities
                ltrFooter.Text = (From q In _data.Menus Where q.Title = "footer" And q.LanguageId = _lang Select q.Description).FirstOrDefault
            End Using

            Dim lstNodeSEO As New DataSet
            lstNodeSEO.ReadXml(MapPath("../../xml/FooterSEO.xml"))
            With rptSEO
                .DataSource = lstNodeSEO.Tables("Node")
                .DataBind()
            End With
        End If
    End Sub

    
    Protected Sub rptSEO_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles rptSEO.ItemDataBound
        Dim hplTitle As HyperLink
        hplTitle = e.Item.FindControl("hplTitle")

        ' hplTitle.NavigateUrl = DomainURL & "Page/Default.aspx?DepID=" & e.Item.DataItem("DepID").ToString
        hplTitle.NavigateUrl = e.Item.DataItem("URL").ToString
        hplTitle.Text = "<h3>" & e.Item.DataItem("Title") & "</h3>"

    End Sub
    

    

End Class
